#ifndef XWIDGET_H
#define XWIDGET_H

class XWidget
{
	public:
		XWidget() {};
		XWidget(XResourcesManager *data, int width, int height, int positionX, int positionY);
		virtual void CheckState(const sf::Input &input);
		virtual void CheckEvent(const sf::Event &Event);
		virtual void Draw();

		int focus();
		virtual void SetFocus(bool focus);
		void SetDraw(bool draw);
		int type();
		int state();
		void SetState(int state);
		void Move(int positionX, int positionY);
		virtual void SetPosition(int positionX, int positionY);

		int width() {return x_width;}
		int height() {return x_height;}
		int positionX() {return x_positionX;}
		int positionY() {return x_positionY;}

		// ...
		virtual void SetText(std::string text) {}
		virtual void SetText(std::string text, bool isStatic) {}
		virtual std::string GetText() {return "";}
		virtual void SetPassword(bool isPassword) {}
		virtual void SetBackground(bool isBackground) {}
		virtual void SetColor(sf::Color color) {}
		virtual void SetAlign(std::string align) {};
		virtual void SetShadow(bool isShadow) {};
		virtual void NewLine(std::string text, int color) {};

	protected:
		sf::RenderWindow* x_app;
		XResourcesManager* x_data;

		std::string x_name;
		bool x_visible;
		bool x_mouseIn;
		bool x_mousePressed;
		bool x_draw;
		int x_width;
		int x_height;
		int x_positionX;
		int x_positionY;
		int x_startingPositionX;
		int x_startingPositionY;
		int x_focus;
		int x_type;
		int x_state;
};

#endif